<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/inc/taglib.jsp"%>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return navTabSearch(this);" action="${pageContext.request.contextPath}/statistics/merchantOrder/list" method="post">
		<!-- 分页表单参数 -->
		<%@include file="/WEB-INF/page/inc/pageForm.jsp"%>
		<!-- 需要排序的字段 -->
		<input type="hidden" name="orderField" value="${requestScope.dwzPageBean.countResultMap.orderField}" />
		<!-- 正序倒序 -->
		<input type="hidden" name="orderDirection" value="${requestScope.dwzPageBean.countResultMap.orderDirection}" />
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>店铺：<input type="text" name="shop" value="${requestScope.dwzPageBean.countResultMap.shop}"></td>
					<td></td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">查询</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<%--<shiro:hasPermission name="/statistics/merchantOrder/toInsert">
				<li><a class="add" href="${pageContext.request.contextPath}/statistics/merchantOrder/toInsert" rel="insert" target="dialog" mask="true"><span>添加</span></a></li>
			</shiro:hasPermission>
			<shiro:hasPermission name="/statistics/merchantOrder/delete">
				<li><a class="delete" href="${pageContext.request.contextPath}/statistics/merchantOrder/delete" rel="id" target="selectedTodo" title="确定要删除吗？" warn="请最小选择一条记录" mask="true"><span>批量删除</span></a></li>
			</shiro:hasPermission>--%>
		</ul>
	</div>
	<table class="table" targetType="navTab" asc="asc" desc="desc" width="100%" layoutH="138">
		<thead>
			<tr style="text-align: center">
				<th width="22"><input type="checkbox" group="id" class="checkboxCtrl"></th>
				<th orderField="mo.order_num" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.order_num'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>订单号</th>
				<th orderField="mo.order_process" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.order_process'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>订单流程</th>
				<th orderField="mo.order_money" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.order_money'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>订单金额</th>
				<th orderField="mo.receivable_money" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.receivable_money'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>应收金额</th>
				<%--<th orderField="mo.real_money" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.real_money'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>实收金额</th>
				<th orderField="mo.pay_time" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.pay_time'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>支付时间</th>
				<th orderField="mo.complete_time" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.complete_time'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>完成时间</th>--%>
				<th orderField="mo.shop_id" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.shop_id'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>店铺</th>
				<%--<th orderField="mo.memo" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.memo'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>备注</th>--%>
				<th orderField="mo.creater" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.creater'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>订单创建人</th>
				<th orderField="mo.shop_operator" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.shop_operator'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>订单操作人</th>
				<%--<th orderField="mo.merchant_operator" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.merchant_operator'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>></th>--%>
				<th orderField="mo.add_time" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.add_time'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>添加时间</th>
				<th orderField="mo.account_type" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.account_type'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>账户类型</th>
				<th orderField="mo.update_time" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.update_time'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>更新时间</th>
				<th orderField="mo.rvid" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.rvid'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>审核人</th>
				<th orderField="mo.rvrm" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mo.rvrm'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>审核备注</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			
				<c:if test="${requestScope.dwzPageBean != null &&  requestScope.dwzPageBean.recordList != null }">
					<c:forEach var="record" items="${requestScope.dwzPageBean.recordList}" varStatus="status">
						<tr >
							<td><input name="id" value="${record.merchantOrderId}" type="checkbox"></td>
							<td>${record.orderNum}</td>
							<!--  0新订单 1已受理  2待收货 6退款中 7已退货 8取消订单  9 完成-->
							<td>
								${record.orderProcess==0?"新订单":record.orderProcess==1?"已受理":record.orderProcess==2?"待收货":record.orderProcess==6?"退款中":record.orderProcess==7?"已退货":record.orderProcess==8?"取消订单":record.orderProcess==9?"完成":record.orderProcess}
							</td>
							<td>${record.orderMoney}</td>
							<td>${record.receivableMoney}</td>
							<%--<td>${record.realMoney}</td>
							<td>${record.payTime}</td>
							<td><fmt:formatDate value="${record.completeTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>--%>
							<td><%--${record.shopId}--%>${record.shopName}</td>
							<%--<td>${record.memo}</td>--%>
							<td><%--${record.creater}--%>${record.shopEmployeeName}</td>
							<td><%--${record.shopOperator}--%>${record.shopEmployeeName}</td>
							<%--<td>${record.merchantOperator}</td>--%>
							<td><fmt:formatDate value="${record.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
							<!--：1-A帐，2-B帐-->
							<td>${record.accountType==1?"A帐":(record.accountType==2?"B帐":record.accountType)}</td>
							<td><fmt:formatDate value="${record.updateTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
							<td><%--${record.rvid}--%>${record.rvName}</td>
							<td>${record.rvrm}</td>
							<td>
								<%--<shiro:hasPermission name="/statistics/merchantOrder/toUpdate">
								<a title="编辑" target="dialog" href="${pageContext.request.contextPath}/statistics/merchantOrder/toUpdate?id=${record.merchantOrderId}" class="editBtn" mask="true"><span>编辑</span></a>
								</shiro:hasPermission>
								<shiro:hasPermission name="/statistics/merchantOrder/delete">
								<a title="确定要删除吗？" mask="true" target="ajaxTodo" href="${pageContext.request.contextPath}/statistics/merchantOrder/delete?id=${record.merchantOrderId}" class="deleteBtn" mask="true"><span>删除</span></a>
								</shiro:hasPermission>--%>
							</td>
														
						</tr>
					</c:forEach>
				</c:if>
			
		</tbody>
	</table>
	<!-- 分页条 -->
	<%@include file="/WEB-INF/page/inc/pageBar.jsp"%>
</div>